package com.uzai.console.service.feign;

import com.uzai.console.common.UzaiRespVo;
import com.uzai.console.dto.feign.wxpub.AuthUnBindDto;
import com.uzai.console.dto.feign.wxpub.AuthUrlDto;
import com.uzai.console.dto.wxpubmanage.*;
import com.uzai.console.service.feign.impl.WxServerFeignFallbackFactory;
import com.uzai.console.vo.wxpub.*;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.multipart.MultipartFile;

/**
 * @Auther: cen
 * @Date: 2022-3-22 15:27:45
 * @Description:
 */
@Component
@FeignClient(value = "uzai-wx-server", fallbackFactory = WxServerFeignFallbackFactory.class)
public interface WxServerFeignService {

    /**
     * 获取授权链接
     */
    @PostMapping("/wxAuth/queryAuthUrl")
    UzaiRespVo<AuthUrlVo> queryAuthUrl(@RequestBody AuthUrlDto authUrlDto);

    /**
     * 获取授权链接
     */
    @PostMapping("/wxAuth/unbind")
    UzaiRespVo<Boolean> unbind(@RequestBody AuthUnBindDto unBindDto);

    /**
     * 创建菜单
     */
    @PostMapping("/wxpub/menu/create")
    UzaiRespVo<BaseResponse> createMenu(@RequestBody CreateMenuDto dto);

    /**
     * 查询菜单
     */
    @PostMapping("/wxpub/menu/query")
    UzaiRespVo<Boolean> queryMenu(@RequestBody CreateMenuDto dto);

    /**
     * 创建图文素材
     */
    @PostMapping("/wxpub/material/create")
    UzaiRespVo<Boolean> createMaterial(@RequestBody CreateMaterialDto dto);

    /**
     * 删除素材
     */
    @PostMapping("/wxpub/material/delete")
    UzaiRespVo<Boolean> deleteMaterial(@RequestBody DeletePublishDto dto);

    /**
     * 修改素材
     */
    @PostMapping("/wxpub/material/update")
    UzaiRespVo<Boolean> updateMaterial(@RequestBody UpdateMaterialDto dto);

    /**
     * 查询素材列表
     */
    @PostMapping("/wxpub/material/query")
    UzaiRespVo<MaterialBatchGetResponse> queryMaterial(@RequestBody QueryMaterialDto dto);

    /**
     * 上传文件
     */
    @PostMapping("/wxpub/material/uploadFile")
    UzaiRespVo<MediaResponse> uploadFile(@RequestBody UploadMaterialDto dto);

    /**
     * 查询素材图文详情
     */
    @PostMapping("/wxpub/material/queryDetail")
    UzaiRespVo<NewsItemResponse> queryDetail(@RequestBody QueryMaterialDto dto);

    /**
     * 查询素材图片详情
     */
    @PostMapping("/wxpub/material/queryPicDetail")
    UzaiRespVo<PicByteStringResponse> queryPicDetail(@RequestBody QueryMaterialDto dto);

    /**
     * 获取活码二维码图片
     */
    @PostMapping("/wxpub/create/qrcode")
    UzaiRespVo<CreateQrcodeVo> createQrcode(@RequestBody QrcodeDto dto);

}
